*** Revised and Corrected Do File APR Immigration Attitudes and Inequality ***

clear
use "C:\Users\dmac9\Dropbox\R&R APR Immigration and Inequality\Final Replication Data Immigration Attitudes and Inequality.dta"

*** Main Models - Table 3 & Figure 1 ***
reg govt_services_scale01 c.top1##c.Imm_Factor01 female age college income01 own_home married pid01 ideo01 MHI unemployment Confederacy i.year if white==1, cluster(yearfips)
outreg2 using tab.tex, dec(3) replace

margins, dydx(top1) at(Imm_Factor01=(0(.1)1))
marhis Imm_Factor01, mar(top1) percent

reg govt_insurance_scale01 c.top1##c.Imm_Factor01 female age college income01 own_home married pid01 ideo01 MHI unemployment Confederacy i.year if white==1, cluster(yearfips)
outreg2 using tab.tex, dec(3) append

margins, dydx(top1) at(Imm_Factor01=(0(.1)1))
marhis Imm_Factor01, mar(top1) percent

*** Table 4 ***
reg govt_services_scale01 Imm_Factor01 foreign_pct female age college income01 own_home married pid01 ideo01 top1 MHI unemployment Confederacy i.year if white==1, cluster(yearfips)
outreg2 using tab.tex, dec(3) replace

reg govt_insurance_scale01 Imm_Factor01 foreign_pct female age college income01 own_home married pid01 ideo01 top1 MHI unemployment Confederacy i.year if white==1, cluster(yearfips)
outreg2 using tab.tex, dec(3) append

